<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>首页</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0,minimum-scale=1.0, maximum-scale=1.0,user-scalable=no">
  <script src="/javascripts/jquery-3.1.1.js"></script>
  <script src="/javascripts/angular.js"></script>
  <script src="/plugin/bootstrap/js/bootstrap.js"></script>
  <link rel="stylesheet" href="/plugin/bootstrap/css/bootstrap.css">
  <link rel="stylesheet" href="/stylesheets/animate.css"/>
  <link rel="stylesheet" href="/stylesheets/style.css">
  <script src="/javascripts/fanhui.js"></script>
  <script src="/javascripts/js.js"></script>
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top">
  <div class="container">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a style="font-size: 22px" class="navbar-brand" href="#">众创平台</a>
    </div>
    <div id="navbar" class="collapse navbar-collapse">
      <ul class="nav navbar-nav">
        <li class="active"><a href="/zhuye">首页</a></li>
        <li><a href="/anli">成功案例</a></li>
        <% if (user) { %>
        <li><a href="/post">创业经验</a></li>
        <li><a href="/jianjie">平台简介</a></li>
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown">个人中心 <span class="caret"></span></a>
          <ul style="min-width: 85px;" class="dropdown-menu">
            <li><a href="/geren">个人资料</a></li>
            <li><a href="/u/<%= user.name %>">我的主页</a></li>
          </ul>
        </li>
      </ul>
      <ul class="nav navbar-nav navbar-right">
        <li><img class="touxing" src="/images/<%= user.name %>.jpg" onerror="this.src='images/touxiang/1.jpg'"/></li>
        <li><a href="/geren"><%= user.name %></a></li>
        <li><a href="/logout">退出</a></li>
      </ul>
        <% } else { %>
      </ul>
      <ul class="nav navbar-nav navbar-right">
        <li><a href="/login">登录</a></li>
        <li><a href="/reg">注册</a></li>
      </ul>
        <% } %>
    </div>
  </div>
</nav>
<article>
  <% if (success) { %>
  <div id="chenggong"><%= success %></div>
  <% } %>
  <% if (error) { %>
  <div id="shibai"><%= error %></div>
<% } %>
